package utils

import (
	"github.com/mitchellh/mapstructure"
)

func Map2Struct(input interface{}, output interface{},) error {
	mapdecode, _ := mapstructure.NewDecoder(&mapstructure.DecoderConfig{TagName: "json", Result:output})
	err := mapdecode.Decode(input)
	return err
}